import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

import {BkTenYearOfGet} from '@/api'

//由于mockjs与cropper发生冲突，取消背景轮播图mockjs获取，改为从服务器获取

const state = {
    bkImagesList:[
        {
            "id": "1",
            "imgUrl": "@/assets/tenYearOfHome/background-image1.jpg"
        },
        {
            "id": "2",
            "imgUrl": "@/assets/tenYearOfHome/background-image2.jpg"
        },
        {
            "id": "3",
            "imgUrl": "@/assets/tenYearOfHome/background-image3.jpg"
        },
        {
            "id": "4",
            "imgUrl": "@/assets/tenYearOfHome/background-image4.jpg"
        }
    ],
}

const actions = {
    // async reqBkImagesAction(context){
    //     let result = await BkTenYearOfGet();
    //     if(result.data.code==200){
    //         context.commit('REQBKIMAGESACTION',result.data.data)
    //     }
    // }


}

const mutations = {
    // REQBKIMAGESACTION(state,value){
    //     state.bkImagesList = value;
    // }

}

const getters = {}

export default {
    namespaced:true,state,mutations,actions,getters
}